<template>
  <div>
    <el-dialog title="设置备注" :visible.sync="dialogVisible" width="600px">
      <el-input v-model="queryParams.remarks" placeholder="请输入备注" style="width: 350px;" />

      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="confirm">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import { setRemarks } from '@/api/table'
export default {
  components: {
  },
  data() {
    return {
      dialogVisible: false,
      listLoading: true,
      total: 0,
      queryParams: {
        remarks: '',
        userId: ''
      },
      list: [],
      record: {}

    }
  },
  created() {

  },
  methods: {

    async show(record) {
      this.dialogVisible = true
      this.queryParams.userId = record.id
      this.queryParams.remarks = record.remarks
    },
    confirm() {
      this.$confirm('是否确认?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        setRemarks({ remarks: this.queryParams.remarks, userId: this.queryParams.userId }).then(res => {
          this.dialogVisible = false
          this.queryParams.rate = ''
          this.$parent.fetchData()
          this.$message({
            message: '操作成功',
            type: 'success'
          })
        })
      })
    }

  }
}
</script>
<style scoped lang="scss">
.el-tag+.el-tag {
 margin-left: 10px;
}

.button-new-tag {
 margin-left: 10px;
 height: 32px;
 line-height: 30px;
 padding-top: 0;
 padding-bottom: 0;
}

.input-new-tag {
 width: 90px;
 margin-left: 10px;
 vertical-align: bottom;
}

.list {
 .item {
   border: 1px solid #c0ccda;
   border-radius: 5px;
   display: flex;
   justify-content: space-between;
   align-items: center;
   padding: 10px;
   margin-top: 10px;

   >div {
     display: flex;

     img {
       margin-right: 15px;
     }
   }

   >i {
     font-size: 20px;
     cursor: pointer;
   }
 }
}
</style>
